<html>
<head>
    <meta http-equiv="content-type" content="text/html;charset=utf-8"/>
    <meta name="viewport" content="width=device-width, initial-scale=1"/>
    <title>享越悦支付</title>

    <link rel="stylesheet" href="__ROOT__/Application/Public/css/bootstrap.min.css"/>
    <link rel="stylesheet" href="__ROOT__/Application/Public/css/layer-pop.css"/>
    <link rel="stylesheet" href="__ROOT__/Application/Public/css/loading.css"/>

    <style>
        body {
            background-color: #f0f0f0;
            font-family: 微软雅黑;
        }

        .container-fluid {
            padding-top: 10px;
        }

        .col-lg-4 .row {
            margin-top: 20px;
            margin-bottom: 20px;
        }

        .pay-info {
            background: white;
            padding-top: 10px;
            padding-bottom: 10px;
        }

        .text-danger {
            color: red;
        }

        .spinner6 {
            width: 100%;
            padding: 20px 0;
            margin: 0;
        }

        .spinner6 > div {
            width: 20px;
            height: 20px;
        }
    </style>


</head>
<body>
<div class="layer">
    <div class="layer-pop ">
        <div class="pop-content">
            交易终止,请重新支付
        </div>
        <div class="spinner6">
            <div class="bounce1"></div>
            <div class="bounce2"></div>
            <div class="bounce3"></div>
        </div>
    </div>
</div>

<div class="container-fluid">
    <div class="row">
        <div class="col-lg-4 col-lg-offset-4">
            <div class="row">
                <div class="col-xs-12 text-center">
                    <h4>
                        <small>享越悦</small>
                    </h4>
                    <h1>
                        <small>￥</small>
                        <strong class="text-danger">{$MONEY/100}</strong>
                    </h1>
                </div>
            </div>
            <div class="row  pay-info">
                <div class="col-xs-3 text-left" style="padding-right: 0">
                    <h5>商户名称</h5>
                </div>
                <div class="col-xs-9 text-right">
                    <h5>{$TEAMNAME}</h5>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
<script type="text/javascript" src="__ROOT__/Application/Public/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript">
    //调用微信JS api 支付
    function jsApiCall() {
        WeixinJSBridge.invoke(
                'getBrandWCPayRequest',
                {$jsApiParameters},
                function (res) {
                    WeixinJSBridge.log(res.err_msg);
                    if (res.err_msg == 'get_brand_wcpay_request:cancel') {
                        $(".layer").show();
                        setTimeout(function () {
                            $(".layer").hide();
                            window.location.href = "http://www.xgdg.shop/BookS/index.php/WxPay/index";
                        }, 800);
                    }
                    if (res.err_msg == 'get_brand_wcpay_request:ok') {
                        window.location.href = "http://www.xgdg.shop/BookS/index.php/WxPay/index";
                    }
                }
        );
    }

    function callpay() {
        if (typeof WeixinJSBridge == "undefined"){
            if( document.addEventListener ){
                document.addEventListener('WeixinJSBridgeReady', jsApiCall, false);
            }else if (document.attachEvent){
                document.attachEvent('WeixinJSBridgeReady', jsApiCall);
                document.attachEvent('onWeixinJSBridgeReady', jsApiCall);
            }
        }else{
            jsApiCall();
        }
    }

    $(function () {
        callpay();
    });
</script>
</html>  